package hzjbbis.commons.maintenance.action;
//package hzjbbis.commons.maintenance.action

import hzjbbis.framework.context.ContextFacade;
import hzjbbis.framework.context.UserContext;
import hzjbbis.framework.xml.dom.extended.DocumentFactory;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.w3c.dom.Document;

/**
 * @version 	1.0
 * @author
 */
public class LoadMaintenanceOfTreeAction extends Action {

	public ActionForward execute(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {
		UserContext userContext =
			ContextFacade.getAppContext().getUserContext(request);
		Document treeDoc =
			DocumentFactory.createExtendedDoc(
				userContext.getServerContext().getServerFile(
					"/jsp/commons/maintenance/test_tree.xml"));

		request.setAttribute("xml", treeDoc);

		return mapping.findForward("xmlResult");

	}
}
